<!DOCTYPE html>
<html lang="zh-CN">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title></title>
  </head>
  <body>
    <div id="app">
      <btn-a></btn-a>
    </div>
    <script src="./vue.js"></script>
    <script>

      const vm = new Vue({
        el: "#app",
        data: {},
        methods: {},
        components: {
          "btn-a": {
            template: `<div><btn-b :cat-do="msg"></btn-b></div>`,
            data() {
              return {
                msg: "父组件的值",
              };
            },
            components:{
              "btn-b":{
                template:`<p>{{catDo}}</p>`,
                props:['catDo']
              }
            }
          },
        },
      });
    </script>
  </body>
</html>
